<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        p {
            text-align: center;
        }

        span {
            color: red;
        }


    </style>
</head>
<body>
<p>
     <span id="time">3</span>秒之后跳转首页
</p>
<script>
    var time = document.getElementById("time");
    var a = 3;

    function fun() {
        a--;
        if (a <= 0) {
            location.href = "/day15/index.html"

        }
        time.innerHTML = a + "";
    }

    setInterval(fun, 1000);
</script>
</body>
</html>